#!/usr/bin/env python
# encoding: utf-8
"""
model.py
@author Andrey Pavlenko
"""

import datetime
from google.appengine.ext import db
from google.appengine.api import users

class Post(db.Model):
    '''
    Object for blog post and page.
    '''
    author=db.UserProperty(required = True, auto_current_user_add = True) 
    title=db.StringProperty()
    slug=db.StringProperty()
    content=db.TextProperty()
    public_date=db.DateTimeProperty(auto_now_add=True)
    modify_date=db.DateTimeProperty(auto_now = True)
    is_draft = db.BooleanProperty()
    enable_comments = db.BooleanProperty()
    comments_count = db.IntegerProperty(default = 0)
    tags = db.CategoryProperty()
